-- CALC_BINE_MAX_MP

-- 计算魔藤最大魔法值
-- @param bine    魔藤
return function(bine)
    local level = bine:getLevel();
    local max_mp = FormulaM.invoke("BINE_BASE_MP", level);

    -- 加成
    local prop = PropM.combine(bine, "attrib2", "max_mp");
    max_mp = PropM.apply(prop, max_mp);

    -- 玩家属性加成
    if ME.user:queryAttrib("bine_attrib") > 0 then
        max_mp = max_mp + 30;
    end

    return max_mp;
end
